package me.muci.B_threadMethods.synchronizedTest;

/**
 * ClassName: Test <br/>
 * Description: <br/>
 * date: 2021/8/9 14:16<br/>
 *
 * @author muci<br />
 * @description
 * @since JDK 1.8
 */
public class Test {

    public static void main(String[] args) {
        MyThreadWithSync myThreadWithSync = new MyThreadWithSync();
        Thread t1 = new Thread(myThreadWithSync,"t1");
        Thread t2 = new Thread(myThreadWithSync,"t2");
        t1.start();
        t2.start();

        MyThreadWithNoSync myThreadWithNoSync = new MyThreadWithNoSync();
        Thread t3 = new Thread(myThreadWithNoSync,"t3");
        Thread t4 = new Thread(myThreadWithNoSync,"t4");

        t3.start();
        t4.start();
    }
}
